/**
 * Created by XiaAo on 2017/5/5.
 */
// var ZZ = require('../../service/2.js');


var postgraduateModule = require('../../ngModule/ngModuleLibMember');//请求书籍管理Module

postgraduateModule.controller('postgraduateCtrl', ['$rootScope', '$scope', '$state', '$http', function ($rootScope, $scope, $state, $http) {

    $rootScope.itemLibHightFocus = ['', '', 'left-Bar-High-Focus', ''];
    // $state.go('.memberDefault');

    console.log('执行到phDCtrl');

    //显示详细信息
    $scope.infoDisplay = function (arr) {
        $scope.infoList = arr;
        $scope.$broadcast('to-child', arr);
        console.log(arr);
        console.log($scope.infoList);
        $('#info-display').css('display','block');
    };

    $http({
        method: 'GET',
        url: '../showstudents/QueryAllStudentsAction.action'
        // catch:true,
    }).then(function (data, status, headers, config) {
        // this callback will be called asynchronously
        // when the response is available
        console.log('data请求成功------');

        console.log(data);
        $scope.items = JSON.parse(data.data)[0].data;
        console.log('====');
        console.log($scope.items[0].sName);

    }).catch(function (data, status, headers, config) {
        console.log('data请求失败------');
        console.error();
    });

}]);

